/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2021-01-09
*/
package com.rzico.market.service;

import com.rzico.base.BaseMapper;
import com.rzico.base.impl.BaseServiceImpl;
import com.rzico.market.entity.PhoneOrderLog;
import com.rzico.market.mapper.BigScreenMapper;
import com.rzico.market.mapper.PhoneOrderLogMapper;
import com.rzico.market.model.BigScreenVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.web.PageableArgumentResolver;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <pre>
 * 豆讯话费订单日志业务类
 * </pre>
 *
 * @author Rzico Boot
 * @version 1.0
 */
@Service
public class BigScreenService extends BaseServiceImpl<PhoneOrderLog, String> {

    @Autowired
    private BigScreenMapper bigScreenMapper;

    @Override
    public BaseMapper<PhoneOrderLog, String> getMapper() {
        return bigScreenMapper;
    }

    /**
     * 用户昨日支付高峰期
     * @param params
     * @return
     */
    public List<BigScreenVo> selectPayInfoList(Map<String, Object> params){
        return bigScreenMapper.selectPayInfoList(params);
    }

    /**
     * 每日订单的商品数量排行
     * @param params
     * @return
     */
    public List<BigScreenVo> selectProductInfoList(Map<String, Object> params){
        return bigScreenMapper.selectProductInfoList(params);
    }

    /**
     * 日新增用户数（导入+新增）
     * @param params
     * @return
     */
    public int selectUserAddNum(Map<String, Object> params){
        return bigScreenMapper.selectUserAddNum(params);
    }

    /**
     * 日访问用户数
     */
    public int selectUserVisitNum(Map<String, Object> params){
        return bigScreenMapper.selectUserVisitNum(params);
    }

    /**
     * 日订单均价
     * @param params
     * @return
     */
    public BigDecimal selectOrderAverageAmount(Map<String, Object> params){
        return bigScreenMapper.selectOrderAverageAmount(params);
    }

    /**
     * 日总订单数
     * @param params
     * @return
     */
    public int selectOrderNum(Map<String, Object> params){
        return bigScreenMapper.selectOrderNum(params);
    }

    /**
     * 订单总金额
     * @param params
     * @return
     */
    public BigDecimal selectOrderAmount(Map<String, Object> params){
        return bigScreenMapper.selectOrderAmount(params);
    }

    /**
     * 订单商品数
     * @param params
     * @return
     */
    public int selectOrderProductNum(Map<String, Object> params){
        return bigScreenMapper.selectOrderProductNum(params);
    }

    /**
     * 订单商品平均数量
     * @param params
     * @return
     */
    public BigDecimal selectOrderProductAverageNum(Map<String, Object> params){
        return bigScreenMapper.selectOrderProductAverageNum(params);
    }

    /**
     * 销量最多的商品类型
     * @param params
     * @return
     */
    public List<BigScreenVo> selectMostProductCategory(Map<String, Object> params){
        return bigScreenMapper.selectMostProductCategory(params);
    }

    /**
     * 累计用户数量
     * @param params
     * @return
     */
    public int selectAllUserNum(Map<String, Object> params){
        return bigScreenMapper.selectAllUserNum(params);
    }

    /**
     * 累计订单金额
     * @param params
     * @return
     */
    public BigDecimal selectAllOrderAmount(Map<String, Object> params){
        return bigScreenMapper.selectAllOrderAmount(params);
    }

    /**
     * 平台优惠券使用金额
     * @param params
     * @return
     */
    public BigDecimal selectOrderCouponAmount(Map<String, Object> params){
        return bigScreenMapper.selectOrderCouponAmount(params);
    }

}
